<?php

spl_autoload_register(function ($class_name) {

    $class_maps = [
        'address_unit_dao' => 'dao/address_unit.php',
        'address_slot_dao' => 'dao/address_slot.php',
        'upload_batch_dao' => 'dao/upload_batch.php',
        'raw_address_dao' => 'dao/raw_address.php',
        'address_unit_value_dao' => 'dao/address_unit_value.php',
        'address_unit_turn_dao' => 'dao/address_unit_turn.php',
        'estate_dao' => 'dao/estate.php',
        'address_unit' => 'entity/address_unit.php',
        'address_slot' => 'entity/address_slot.php',
        'upload_batch' => 'entity/upload_batch.php',
        'raw_address' => 'entity/raw_address.php',
        'address_unit_value' => 'entity/address_unit_value.php',
        'address_unit_turn' => 'entity/address_unit_turn.php',
        'estate' => 'entity/estate.php',
    ];

    if (isset($class_maps[$class_name])) {
        include __DIR__.'/'.$class_maps[$class_name];
    }
});
